:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

/* 打印按钮样式 */
.print-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.print-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* 侧边栏样式 */
.sidebar {
    background-color: var(--secondary);
    color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary);
    display: block;
    margin: 0 auto 20px;
}

.sidebar h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 5px;
    color: var(--light);
}

.sidebar p {
    text-align: center;
    color: var(--gray);
    margin-bottom: 30px;
}

.contact-info, .skills {
    margin-bottom: 30px;
}

.sidebar h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 5px;
}

.contact-info div, .skills ul {
    margin-left: 15px;
}

.contact-info div {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary);
}

.skills ul {
    list-style-type: none;
}

.skills li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.skills li:before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
}

/* 主内容区样式 */
.main-content {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 22px;
    color: var(--secondary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
    position: relative;
}

.section h2:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background-color: var(--primary);
}

.education-item, .project-item, .award-item {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 2px solid var(--light);
    position: relative;
}

.education-item:before, .project-item:before, .award-item:before {
    content: "";
    position: absolute;
    left: -6px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary);
}

.item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.item-header h3 {
    font-size: 18px;
    color: var(--dark);
}

.item-header .date {
    color: var(--gray);
    font-size: 14px;
}

.item-content p {
    margin-bottom: 10px;
    color: #555;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tech-item {
    background-color: var(--light);
    color: var(--dark);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.view-project-btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.view-project-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.self-eval {
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 20px;
    }
    
    .sidebar {
        order: 1;
        background-color: var(--secondary) !important;
        color: white !important;
        padding: 25px;
    }
    
    .main-content {
        order: 2;
        padding: 25px;
    }
    
    .profile-img {
        width: 120px;
        height: 120px;
    }
    
    .sidebar h1 {
        font-size: 22px;
        color: white !important;
    }
    
    .sidebar h2 {
        color: var(--primary) !important;
        border-bottom-color: var(--primary) !important;
    }
    
    .sidebar p, .contact-info div {
        color: var(--light) !important;
    }
    
    .contact-info i {
        color: var(--primary) !important;
    }
    
    .skills li:before {
        color: var(--primary) !important;
    }
    
    .item-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .item-header .date {
        margin-top: 0;
        color: var(--gray);
    }
    
    .tech-stack {
        gap: 8px;
    }
    
    .view-project-btn {
        width: 100%;
        text-align: center;
    }
    
    .print-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .sidebar, .main-content {
        padding: 20px;
    }
    
    .profile-img {
        width: 100px;
        height: 100px;
    }
    
    .contact-info div {
        flex-direction: row;
        align-items: center;
    }
    
    .contact-info i {
        margin-right: 10px;
        margin-bottom: 0;
    }
    
    .print-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
}

/* 打印样式 */
@media print {
    body {
        background-color: white;
        color: black;
        font-size: 12pt;
    }
    
    .container {
        display: block;
        padding: 0;
        max-width: 100%;
    }
    
    .sidebar {
        background-color: white !important;
        color: black !important;
        border: 1px solid #ddd;
        page-break-after: always;
    }
    
    .sidebar h1, .sidebar h2 {
        color: black !important;
    }
    
    .sidebar p, .contact-info div {
        color: #333 !important;
    }
    
    .main-content {
        box-shadow: none;
        padding: 20px 0;
    }
    
    .print-btn {
        display: none;
    }
    
    .profile-img {
        border-color: black !important;
    }
    
    a {
        text-decoration: none;
        color: black;
    }
    
    .tech-item {
        background-color: #f0f0f0 !important;
    }
}